{	Problem: http://codeforces.ru/problemset/problem/55/A
	Verdict: Accepted
}
var n:longint;
begin
read(n);
if n and (n-1)=0 then write('YES') else write('NO');
end.